home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form frmConnect
- BorderStyle = 3 'Fixed Double
- Caption = "Connect To Chat Line"
- ClientHeight = 2445
- ClientLeft = 2040
- ClientTop = 2535
- ClientWidth = 5010
- ControlBox = 0 'False
- Height = 2850
- Icon = CONNECT.FRX:0000
- Left = 1980
- LinkTopic = "Form3"
- ScaleHeight = 2445
- ScaleWidth = 5010
- Top = 2190
- Width = 5130
- Begin CommandButton btnCancel
- Cancel = -1 'True
- Caption = "C&ancel"
- Height = 420
- Left = 3825
- TabIndex = 3
- Top = 765
- Width = 1005
- End
- Begin CommandButton btnConnect
- Caption = "&Connect"
- Default = -1 'True
- Height = 420
- Left = 3825
- TabIndex = 2
- Top = 225
- Width = 1005
- End
- Begin TextBox txtAlias
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 330
- Left = 450
- TabIndex = 1
- Top = 1890
- Width = 2940
- End
- Begin TextBox txtHost
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 330
- Left = 450
- TabIndex = 0
- Top = 1170
- Width = 2940
- End
- Begin TextBox txtPort
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 330
- Left = 450
- TabIndex = 4
- Top = 450
- Width = 1185
- End
- Begin Label Label1
- AutoSize = -1 'True
- Caption = "Your Alias:"
- Height = 195
- Index = 2
- Left = 225
- TabIndex = 7
- Top = 1665
- Width = 930
- End
- Begin Label Label1
- AutoSize = -1 'True
- Caption = "Remote Name:"
- Height = 195
- Index = 1
- Left = 225
- TabIndex = 6
- Top = 900
- Width = 1260
- End
- Begin Label Label1
- AutoSize = -1 'True
- Caption = "Remote Port:"
- Height = 195
- Index = 0
- Left = 225
- TabIndex = 5
- Top = 180
- Width = 1125
- End
- DefInt A-Z
- Sub btnCancel_Click ()
- Hide
- End Sub
- Sub btnConnect_Click ()
- '-- Try to connect.
- '-- You must supply a port, Host address
- ' and your alias.
- If Len(txtPort) Then
- If Len(txtHost) Then
- If Len(txtAlias) Then
- OK = True
- End If
- End If
- End If
- If Not OK Then
- MsgBox "All fields are required!"
- Exit Sub
- End If
- '-- Set the port and host name
- frmLocal.dssLocal.RemotePort = Val(txtPort)
- frmLocal.dssLocal.RemoteHost = txtHost
- '-- Temporarily disable the form
- Me.Enabled = False
- Screen.MousePointer = 11
- '-- Connect
- On Local Error Resume Next
- frmLocal.dssLocal.Action = DSSOCK_CONNECT
- '-- Enable the form
- Me.Enabled = True
- Screen.MousePointer = 0
- If Err Then
- MsgBox "Connection Failed"
- End If
- Hide
- End Sub
- Sub Form_Load ()
- '-- Initialize the Port dialog box with
- ' the same port we're listening on.
- txtPort = Trim$(Str$(ListenPort))
- '-- Initialize the Alias to be the name
- ' of the local machine
- txtAlias = frmLocal.dssLocal.LocalName
- End Sub
-